<?php

/**
 * 封号检测
 */

namespace App\Crontab;


use App\Model\DataTable;
use App\Utility\Pool\MysqlPool;
use EasySwoole\EasySwoole\Crontab\AbstractCronTask;
use EasySwoole\EasySwoole\Task\TaskManager;

class DenyRobot extends AbstractCronTask
{
    public static function getRule(): string
    {
        // TODO: Implement getRule() method.
        return '*/30 * * * *';
    }

    public static function getTaskName(): string
    {
        // TODO: Implement getTaskName() method.
    }

    function run(int $taskId, int $workerIndex)
    {
        // TODO: Implement run() method.
        //单个IP 24小时内
        TaskManager::getInstance()->async(function () {
            DenyRobot::testReg();
        });
    }


    public static function testReg()
    {

    }


    function onException(\Throwable $throwable, int $taskId, int $workerIndex)
    {
        // TODO: Implement onException() method.
    }


}